{template 'common/header'}
<ol class="breadcrumb we7-breadcrumb">
	<a href="{php echo $this->createWebUrl('recruitlist');}"><i class="wi wi-back-circle"></i> </a>
	<li>
		<a href="{php echo $this->createWebUrl('recruitlist');}">招聘管理</a>
	</li>
	<li>
		添加招聘
	</li>
</ol>
<div class="clearfix">
	<form action="{php echo $this->createWebUrl('recruitsave')}" method="post" class="we7-form" role="form" id="form1">
		<input type="hidden" name="recruit_id" value="{$recruit['recruit_id']}"/>
		<div class="form-group">
			<label class="col-sm-2 control-label">招聘名称</label>
			<div class="col-sm-8">
				<input type="text" class="form-control" name="recruit_title" value="{$recruit['recruit_title']}" placeholder="招聘名称"/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">薪资范围</label>
			<div class="col-sm-8">
				<input type="text" class="form-control" name="recruit_wages" value="{$recruit['recruit_wages']}" placeholder="薪资范围">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">招聘简介</label>
			<div class="col-sm-8">
				<input type="text" class="form-control" name="recruit_desc" value="{$recruit['recruit_desc']}" placeholder="招聘简介">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">内容</label>
			<div class="col-sm-8">
				{php echo tpl_ueditor('recruit_content', $recruit['recruit_content']);}
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">是否显示</label>
			<div class="col-sm-8">
				<input type="radio" name="is_show" id="is_show-1" value="1" {if $recruit['is_show'] == 1} checked{/if}> 
				<label class="radio-inline" for="is_show-1">是</label>
				<input type="radio" name="is_show" id="is_show-0" value="0" {if $recruit['is_show'] == 0} checked{/if}>
				<label class="radio-inline" for="is_show-0"> 否</label>
			</div>
		</div>
		<div class="form-group">
			<div class="">
				<input type="submit" class="btn btn-primary"  value="提交" />
			</div>
		</div>
	</form>
</div>
<script>
	$(function(){
		$('#form1').submit(function(){
			if(!$.trim($(':text[name="recruit_title"]').val())) {
				util.message('请填写招聘标题', '', 'error');
				return false;
			}
			if(!$.trim($(':text[name="recruit_wages"]').val())) {
				util.message('请填写工资范围', '', 'error');
				return false;
			}
			if(!$.trim($(':text[name="recruit_desc"]').val())) {
				util.message('请填写招聘简介', '', 'error');
				return false;
			}
			if(!$.trim($('textarea[name="recruit_content"]').val())) {
				util.message('请填写招聘内容', '', 'error');
				return false;
			}
			return true;
		});
	});
</script>
{template 'common/footer'}
